using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using FutureOpen.Web.Pages;
using FutureOpen.Core.func.sql;
using FutureOpen.Core.func.util;

public partial class controls_GroupRecentTopics : System.Web.UI.UserControl
{
    private int gid;
    private PageBase pbase;
    protected void Page_Load(object sender, EventArgs e)
    {
        pbase = (PageBase)this.Page;
        pbase.PageInit();

        gid = pbase.orgid;
        if (!Page.IsPostBack)
        {
            BuildRecentPost();
        }
    }

    public void BuildRecentPost()
    {
        DataSet ds = GroupProvider.GetTopicsByGroupOrder(gid, "topic_hit_count", 0, 10);
        this.Repeater1.DataSource = ds.Tables[0];
        this.Repeater1.DataBind();
        //this.lbContent.Text = sb.ToString();
    }

    public string GroupArtView(object obj1, object obj2, object obj3)
    {
        string url = string.Format("../test/GroupArtView.aspx?artid={0}&orgid={1}", obj1, obj2);
        return StringUtil.EncodeNoDecURL(url, obj3.ToString());        
    }

}


